package com.web;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

/**
 * @author chengjy
 * @date 2025/4/15
 */
public interface HandlerInterceptor {

    default boolean preHandle(HttpServletRequest request, HttpServletResponse response, WebHandler webHandler) {
        return true;
    }
    default boolean postHandle(HttpServletRequest request, HttpServletResponse response, Object result) {
        return true;
    }

    default void afterCompletion(HttpServletRequest request, HttpServletResponse response, WebHandler webHandler) {

    }
}
